<template>
  <!-- 首页推荐的组件 -->
  <div class="recommend-container">
    <!-- 轮播图区域 -->
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item>
        <van-image fit="contain" src="https://yanxuan.nosdn.127.net/0e96b17a4d3bdf88a189bd30f8b23579.jpg?type=webp&imageView&quality=75&thumbnail=750x0"></van-image>
      </van-swipe-item>
       <van-swipe-item>
        <van-image fit="contain" src="https://yanxuan.nosdn.127.net/static-union/1650521438c6f282.jpg?type=webp&imageView&quality=75&thumbnail=750x0"></van-image>
      </van-swipe-item>
       <van-swipe-item>
        <van-image fit="contain" src="https://yanxuan.nosdn.127.net/static-union/1648880455e1cc4d.jpg?type=webp&imageView&quality=75&thumbnail=750x0"></van-image>
      </van-swipe-item>
      <!-- <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item> -->
    </van-swipe>
    <!-- 政策信息 -->
    <div class="policy-info">
      <div>
        <span class="icon"><img src="https://yanxuan.nosdn.127.net/a03dd909803b9ac032eba58b7253a2f6.png" alt=""></span>
        <span class="text">网易自营品牌</span>
      </div>
      <div>
        <span class="icon"><img src="https://yanxuan.nosdn.127.net/2d0402ffcd52b3ec3b07422681c42a89.png" alt=""></span>
        <span class="text">30天无忧退货</span>
      </div>
      <div>
        <span class="icon"><img src="https://yanxuan.nosdn.127.net/eb61ee48e8942dbd1784c9ee75ebe955.png" alt=""></span>
        <span class="text">48小时快速退款</span>
      </div>
    </div>
    <!-- 分类表区域 -->
    <div class="kingkongCarousel">
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/c6fd8835a6400b7da7a016ad85506b69.png"></van-image>
        <p class="text">新品首发</p>
      </div>
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/fede8b110c502ec5799702d5ec824792.png"></van-image>
        <p class="text">居家生活</p>
      </div>
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/896a3beac514ae8f40aafe028e5fec56.png"></van-image>
        <p class="text">服饰鞋包</p>
      </div>
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/37520d1204a0c55474021b43dac2a69e.png"></van-image>
        <p class="text">美食酒水</p>
      </div>
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/6c3bd9d885c818b1f73e497335a68b47.png"></van-image>
        <p class="text">个护清洁</p>
      </div>
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/559d2a240ec20b096590a902217009ff.png"></van-image>
        <p class="text">母婴亲子</p>
      </div>
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/5c088559ebcc3f0ffcda663f04dfbeb2.png"></van-image>
        <p class="text">运动旅行</p>
      </div>
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/fbca8e1f2948f0c09fc7672c2c125384.png"></van-image>
        <p class="text">数码家电</p>
      </div>
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/static-union/1642506913355bb9.png"></van-image>
        <p class="text">宠物生活</p>
      </div>
      <div class="detail">
        <van-image class="img" src="https://yanxuan.nosdn.127.net/static-union/16309892614fb44c.gif"></van-image>
        <p class="text">每日秒杀</p>
      </div>
    </div>
    <!-- banner 横幅 -->
    <div class="banner">
        <van-image src="https://yanxuan.nosdn.127.net/static-union/1651116551d75da9.gif?imageView&quality=75"></van-image>
    </div>
    <!-- 新人专享礼 -->
    <div class="new-user-gift">
      <!-- title 标题区域 -->
      <div class="title">新人专享礼</div>
      <!-- 内容区域 -->
      <div class="content">
        <!-- 左侧区域 -->
        <div class="left">
          <!-- 做的的名字区域 -->
          <div class="name">新人专享礼包</div>
          <div class="img-wrap">
            <!-- 图片区域 -->
            <van-image src="//yanxuan.nosdn.127.net/static-union/1648017994dd2933.png"></van-image>
          </div>
        </div>
        <!-- 右侧区域 -->
        <div class="right">
          <!-- 上半部分 -->
          <div class="top">
            <div class="name">福利社</div>
            <p class="text">今日特价</p>
            <div class="img-wrap">
              <van-image src="https://yanxuan-item.nosdn.127.net/0736325df88942d67a31b5bd5bb2a502.png?quality=75&type=webp&imageView&thumbnail=200x200"></van-image>
            </div>
          </div>
          <!-- 下半部分 -->
          <div class="bottom">
            <div class="name">新人拼团</div>
            <div class="img-wrap">
              <van-image src="https://yanxuan-item.nosdn.127.net/d321d9d51d6b742521eb4cfcd33d62b5.png?quality=75&type=webp&imageView&thumbnail=200x200"></van-image>
            </div>
          </div>
        </div>
      </div>
    </div>
    <van-divider 
     :style="{ borderWidth: '5px',height: '0px',
      borderColor: '#eeeeee' }"/>
    <!-- 类目热销榜 -->
    <!-- <div class="hot">
      <p class="title">类目热销榜</p>
      <div class="top-container">
        <div class="detail">
          美食酒水榜
        </div>
        <div class="detail">
          居家生活榜
        </div>
      </div>
      <div class="bottom">

      </div>
    </div> -->
    
  </div>
</template>

<script>
export default {
  name: 'indexRecommend'
}
</script>
<style lang="less">
  .van-swipe__indicator{
    width: 0.58rem;
    height: 0.07rem;
    border-radius: 0;
  }
</style>
<style lang="less" scoped>
  // 轮播图样式
  .my-swipe  {
    .van-swipe-item{
      height: 4rem;
      width: 100%;
    }
  }

  .recommend-container{
    // 政策信息
    .policy-info{
      display: flex;
      // 平分空间
      justify-content: space-evenly;
      font-size: 0.33rem;
      margin-top: 0.3rem;
      // 图标样式
      .icon{
        img{
          width: 16px;
          height: 16px;
          vertical-align: middle;
          margin-right: 5px;
          margin-top: -2px;
        }
        .text{
          vertical-align: middle;
        }
      }
    }
    // 分类表区域
    .kingkongCarousel{
      margin-top: 0.4rem;
      height: 4.5rem;
      // background: red;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      // 单条数据
      .detail{
        font-size: 0.33rem;
        width: 20%;
        text-align: center;
        
        // 图片样式
        .img{
          width: 1.5rem;
          height: 1.5rem;
        }
      }
      
    }
    // banner
    .banner{
      background-color: #eee;
      height: 3rem;

    }
    // 新人优惠区域
    .new-user-gift{
      // title 区域
      .title{
        text-align: center;
        line-height: 1.5rem;
        position: relative;
        &:before{
          content: "";
          position: absolute;
          top: 50%;
          left: 32%;
          width: 0.4rem;
          height: 0.05rem;
          background: #333;
        }
        &:after{
          content: "";
          position: absolute;
          top: 50%;
          left: 64%;
          width: 0.4rem;
          height: 0.05rem;
          background: #333;
        }
      }
      // 内容区域
      .content{
        height: 6rem;
        padding: 0 0.5rem;
        display: flex;
        font-size: 0.45rem;
        // 左侧
        .left{
          flex: 1;
          background: #f9e9cf;
          margin-right: 0.1rem;
          // name 名字区域
          .name{
            line-height: 1.5rem;
            padding-left: 0.5rem;
          }
          //图片区域
          .img-wrap{
            padding: 0 0.5rem;
            margin-top: 0.2rem;
          }
        }
        // 右侧
        .right{
          flex: 1;
          display: flex;
          flex-direction: column;
          
          .name{
            margin-top: 0.3rem;
          }
          .text{
            font-size: 0.3rem;
            color: #777;
          }
          .top{
            padding: 0 0.4rem;
            flex: 1;
            background-color: #fbe2d3;
            position: relative;
            .img-wrap{
              position: absolute;
              right: 0;
              bottom: 0rem;
              .van-image{
                width: 2.5rem;
              }
            }
          }
          .bottom{
            padding: 0 0.4rem;
            background: #ffecc2;
            margin-top: 0.1rem;
            flex: 1;
            position: relative;
            .img-wrap{
              position: absolute;
              right: 0rem;
              bottom: 0rem;
              .van-image{
                width: 2.5rem;
              }
            }
          }
        }
      }
    }
    // 类目热销榜
    .hot{
      padding: 0 0.5rem;
      // title 
      .title{
        line-height: 30px;
      }
    }
    
  }
</style>